package com.example.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Description: TODO
 * @Author wenlinyu
 * @Date: 2021/3/12 16:06
 * @Version 1.0
 */
@Configuration
public class ApplicationContextConfig {

    @Bean
    @LoadBalanced // ribbon负载均衡 手写轮询算法先注释掉自带的
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }
}
